package com.group525.cloudef.controller.user;


import com.group525.cloudef.Dao.user.UHazardDao;
import com.group525.cloudef.Dao.user.UStatisticDao;
import com.group525.cloudef.service.user.UHazardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author group525
 * @since 2023-05-17
 */
@RestController
@CrossOrigin
@RequestMapping("/user/hazard")
@Api(tags = "危急值信息")
public class UHazardController {
    @Resource
    UHazardService HazardService;

    @PostMapping("/getHazard")
    @ApiOperation(value = "获取危急值列表")
    public List<UHazardDao> getHazard(){return HazardService.getHazard();}
    @PostMapping("/getCount")
    @ApiOperation(value = "获取病例数和危急值数")
    public UStatisticDao getCount(){return HazardService.getCount();}

    @PostMapping("/infectious")
    @ApiOperation(value = "获取传染病")
    public UStatisticDao infectious(){return HazardService.infectious();}
}

